package com.ruileroi.ai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruileroi.ai.entity.po.SpringAiChatMemory;
import org.springframework.ai.chat.memory.ChatMemoryRepository;
import org.springframework.ai.chat.messages.Message;
import org.springframework.lang.NonNull;

import java.util.List;

/**
 * @program: ruileroi-ai
 * @description:
 * @author: wangrui
 * @create: 2025-05-25 19:23
 **/

public interface ISpringAiChatMemoryService extends IService<SpringAiChatMemory>, ChatMemoryRepository {

    List<Message> findTopN(@NonNull String conversationId, int size);
}